//package com.uphone.kingmall.activity;
//
//import android.net.Uri;
//import androidx.fragment.app.Fragment;
//
//import com.uphone.kingmall.activity.chat.ConversationListAdapterEx;
//import com.uphone.kingmall.base.BaseTabActivity0;
//import com.uphone.kingmall.fragment.MessageListFragment;
//import com.uphone.kingmall.utils.intent.IntentData;
//
//import io.rong.imkit.fragment.ConversationListFragment;
//import io.rong.imlib.model.Conversation;
//
///**
// * author : SuMeng
// * e-mail : 986335838@qq.com
// * time   : 2019/02/21
// * desc   : 消息页面
// */
//public class MessageActivity extends BaseTabActivity0 {
//    @Override
//    protected Fragment[] getFragmentList() {
//        msgCountB = msgCount;
//        positionB = position;
//        Fragment conversationList = initConversationList();
//
//        return new Fragment[]{MessageListFragment.newInstance(), conversationList};
//    }
//
//    @Override
//    protected String[] getItems() {
//        return new String[]{"通知消息", "客服服务"};
//    }
//
//    private Conversation.ConversationType[] mConversationsTypes;
//    @IntentData
//    private int position = 0;
//    @IntentData
//    private int msgCount = 0;
//
//    @Override
//    protected String initTitle() {
//        return "消息中心";
//    }
//
//    private ConversationListFragment mConversationListFragment = null;
//
//    private Fragment initConversationList() {
//        if (mConversationListFragment == null) {
//            ConversationListFragment listFragment = new ConversationListFragment();
//            listFragment.setAdapter(new ConversationListAdapterEx(this));
//            Uri uri;
//            if (true) {
//                uri = Uri.parse("rong://" + getApplicationInfo().packageName).buildUpon()
//                        .appendPath("conversationlist")
////                        .appendQueryParameter(Conversation.ConversationType.PRIVATE.getName(), "true") //设置私聊会话是否聚合显示
////                        .appendQueryParameter(Conversation.ConversationType.GROUP.getName(), "true")//群组
////                        .appendQueryParameter(Conversation.ConversationType.PUBLIC_SERVICE.getName(), "true")//公共服务号
////                        .appendQueryParameter(Conversation.ConversationType.APP_PUBLIC_SERVICE.getName(), "true")//订阅号
////                        .appendQueryParameter(Conversation.ConversationType.SYSTEM.getName(), "true")//系统
////                        .appendQueryParameter(Conversation.ConversationType.DISCUSSION.getName(), "true")
//                        .appendQueryParameter(Conversation.ConversationType.CUSTOMER_SERVICE.getName(), "true")
//                        .build();
//                mConversationsTypes = new Conversation.ConversationType[]{Conversation.ConversationType.PRIVATE,
////                        Conversation.ConversationType.GROUP,
////                        Conversation.ConversationType.PUBLIC_SERVICE,
////                        Conversation.ConversationType.APP_PUBLIC_SERVICE,
////                        Conversation.ConversationType.SYSTEM,
////                        Conversation.ConversationType.DISCUSSION,
//                        Conversation.ConversationType.CUSTOMER_SERVICE
//                };
//
//            } else {
//                uri = Uri.parse("rong://" + getApplicationInfo().packageName).buildUpon()
//                        .appendPath("conversationlist")
////                        .appendQueryParameter(Conversation.ConversationType.PRIVATE.getName(), "false") //设置私聊会话是否聚合显示
////                        .appendQueryParameter(Conversation.ConversationType.GROUP.getName(), "false")//群组
////                        .appendQueryParameter(Conversation.ConversationType.PUBLIC_SERVICE.getName(), "true")//公共服务号
////                        .appendQueryParameter(Conversation.ConversationType.APP_PUBLIC_SERVICE.getName(), "true")//订阅号
////                        .appendQueryParameter(Conversation.ConversationType.SYSTEM.getName(), "true")//系统
//                        .appendQueryParameter(Conversation.ConversationType.CUSTOMER_SERVICE.getName(), "true")
//                        .build();
//                mConversationsTypes = new Conversation.ConversationType[]{Conversation.ConversationType.PRIVATE,
////                        Conversation.ConversationType.GROUP,
////                        Conversation.ConversationType.PUBLIC_SERVICE,
////                        Conversation.ConversationType.APP_PUBLIC_SERVICE,
////                        Conversation.ConversationType.SYSTEM,
//                        Conversation.ConversationType.CUSTOMER_SERVICE
//                };
//            }
//            listFragment.setUri(uri);
//            mConversationListFragment = listFragment;
//            return listFragment;
//        } else {
//            return mConversationListFragment;
//        }
//    }
//}
